﻿#include "UTwoListUMG.h"

#include "ListLibrary/ListUIStyle.h"

UTwoListUMG::UTwoListUMG()
{

}

TSharedRef<SWidget> UTwoListUMG::RebuildWidget()
{
	TwoList = SNew(STwoList);
	return TwoList.ToSharedRef();
}

const FText UTwoListUMG::GetPaletteCategory()
{
	return FText::FromString(TEXT("小辉辉"));
}

//资源释放
void UTwoListUMG::ReleaseSlateResources(bool bReleaseChildren)
{
	Super::ReleaseSlateResources(bReleaseChildren);
	TwoList.Reset();
}

void UTwoListUMG::UpDataList(int width,TMap<FString,FTwoListInfo> ListData)
{
	TwoList->UpDataList(width,ListData);
}

//更新UI
void UTwoListUMG::SynchronizeProperties()
{
	Super::SynchronizeProperties();
	TwoList->UpDataTitleName(Title);
	TwoList->UpDataOneInfoName(OneInfo);
	TwoList->UpDataTwoInfoName(TwoInfo);
}